Skip to content

Add Time duration support #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2019
Merged

Conversation

radeno
Copy link
Contributor

@radeno radeno commented Jun 24, 2019

This PR contains:

  • bugfix
  • feature
  • refactor
  • tests
  • documentation
  • metadata

Breaking Changes?

  • yes
  • no

Please Describe Your Changes

This PR adds support for time duration values. Nothing more.

@@ -14,7 +14,7 @@ const { registerWalker } = require('../walker');

const Node = require('./Node');

const unitRegex = /%|ch|cm|em|ex|in|mm|pc|pt|px|q|rem|vh|vmax|vmin|vw$/i;
const unitRegex = /%|ch|cm|em|ex|in|mm|ms|pc|pt|px|s|q|rem|vh|vmax|vmin|vw$/i;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathantneal
Copy link
Collaborator

@shellscape, this seems pretty clean. I‘m not sure why the unitRegex has a $ expression at the end of vw, but this change is consistent with how the tool already works.

@radeno
Copy link
Contributor Author

radeno commented Jun 24, 2019

I tried to add also angle units. But it doesn't take 90deg as value, test fails. Another value, like 10deg was ok. Don't have time to dig deeper why.
So support time values is small step forward.

@shellscape shellscape merged commit 926df59 into shellscape:master Jun 26, 2019
@shellscape
Copy link
Owner

Thanks for putting this together 🍺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants